/* GUI CONVERTED from reshmta.i (converter v1.76) Thu Apr 11 05:26:24 2002 */
/* reshmta.i - Repetitive Subcontract Shipper Maint Include                   */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.5.1.3 $                                                       */
/*V8:ConvertMode=Maintenance                                                  */
/* REVISION: 7.3      LAST MODIFIED: 10/31/94   BY: WUG *GN77*                */
/* REVISION: 8.6      LAST MODIFIED: 04/09/97   BY: *K08N* Steve Goeke        */
/* REVISION: 8.6      LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* Mark Brown         */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.5.1.3 $    BY: Jean Miller       DATE: 04/09/02  ECO: *P058*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* WHEN WE ARE HERE, WE HAVE NEITHER PARENT OR CHILD RECORDS.
   THIS IS BECAUSE WE DON'T WANT THE USER CHANGING SHIPFROM/SHIPTO
   INFO WHICH WOULD CAUSE INCONSISTENCY IN THE STRUCTURE */

ststatus = stline[2].
status input ststatus.

set abs_shipto go-on(F5 CTRL-D).

if lastkey = keycode("F5") or lastkey = keycode("CTRL-D") then do:

   del-yn = yes.
   {pxmsg.i &MSGNUM=11 &ERRORLEVEL=1 &CONFIRM=del-yn}
   if del-yn = no then undo, retry.

   /* Delete additional shipper info using form services */
   {gprun.i  ""sofsde.p""  "(recid(abs_mstr))" }
/*GUI*/ if global-beam-me-up then undo, leave.


   delete abs_mstr.
   clear frame a.
/*GUI*/ RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
   clear frame b.
/*GUI*/ RECT-FRAME-LABEL:SCREEN-VALUE in frame b = F-b-title.
   next mainloop.

end.

find vd_mstr where vd_addr = abs_shipto no-lock no-error.

if not available vd_mstr then do:
   /* Not a valid supplier */
   {pxmsg.i &MSGNUM=2 &ERRORLEVEL=3}
   bell.
   next-prompt abs_shipto.
   undo, retry.
end.

find ad_mstr where ad_addr = abs_shipto no-lock.
display
   ad_name
   ad_line1.

if abs__qad01 = "" or substring(abs__qad01,1,40) = fill(" ",40)
then do:
   substring(abs__qad01,1,20) = string(vd_shipvia,"x(20)").
end.
